Plug-in FunctionsFCThis file shows how to disable and enable the plug-in for security.G
2000 Troi Automatisering j
Note: The functions are disabled only for this computer and only while FileMaker application is running. The next time FileMaker is started again the functions are enabled again, so you might want to add the disabling function to a startup script.k
Disable All Functionsm
Get file Contents
B;First specify a password of at least 3 characters (max 60).
password
error code
_cStatus
H^Here you can see the CurrentEnabledStatus, this function returns 0 if disabled , 1 if enabled.
I= With this button you can disable all File Plug-in Functions.
After you have disabled the functions the plug-in will do nothing and return an error code $$-4220. Try it with the sample function in this button.
Enable All Functions
N@ With this button you can (re)enable all File Plug-in Functions.
Clear
Close Demo File
workB
abcdefghijklmnopqrstuvwxyz{|}~
$$-4220
Control: Disable All Functions
Control: Enable All Functions
"Test Function: Get a File Contents
Control: Check if Disabled
-------------
open file
A"Test Function: Get a File Contents
ConverTextFromFMFhThis file shows how get text from a file correctly converted to and from the internal
FileMaker format.
2000 Troi Automatisering `
contentsi
_gErrorCodej
Note: These 2 function work transparant on both Windows and Mac OS. However on Mac you no conversion is done. Test this on Windows.k
2- Put it in a text File m
1- Convert From FM format
Variant 1: Put some text with some higher ASCII characters in the field contents. Then convert the text to FileMaker format by clicking the 1st button. With the 2nd button the contents is written to file.
Convert and Write to a file
;ALVariant 2: Normally you
d convert and put it in a file right in one script:
Previous Sample
Control: Disable All Functions
A@This script will disable all functions of the Troi File plug-in.Bw
|("TrFile-Control"
"-disableAllFunctions |" &
TrFile-Control
-disableAllFunctions |
= -416
Cancel
Please specify a valid password.
-------------
A open file
Control: Enable All Functions
A/This will convert the text to FileMaker format.Bu
|("TrFile-Control"
"-enableAllFunctions |" &
TrFile-Control
-enableAllFunctions |
Control: Check if Disabled
A,This script will get the contents of a file.B
|("TrFile-ContentsDialog"
"Please select a text file (with higher ASCII):")
TrFile-ContentsDialog
.Please select a text file (with higher ASCII):|C9
2) = "$$"
= -4220
Cancel
This function was not executed, because the functions are disabled! You can enable the functions again with the "Enable all functions" button.
Helvetica
Geneva
Times New Roman
A4If the File plug-in is disabled an message is shown.Bw
|("TrFile-Control"
"CurrentEnabledStatus") <> 1
TrFile-Control
CurrentEnabledStatus|
Cancel
This function is not available. Execution of this function is halted.